CXX		= c++
CXXFLAGS	= -std=c++0x
### -pthread obligatoire, pas -lpthread
LDFLAGS		= -pthread /usr/local/lib/libboost_thread.a /usr/local/lib/libboost_system.a -lrt
SRC		= $(wildcard *.cpp)
OBJ		= $(SRC:.cpp=.o)

###--------------------------------------------------------
### Main target
###--------------------------------------------------------
EXEC=test2

all: $(EXEC)

###--------------------------------------------------------
### Main rules
###--------------------------------------------------------

main.o: bucket.h bucket.tcc my_map.h my_map.tcc

test2: $(OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

###--------------------------------------------------------
### Clean
###--------------------------------------------------------
.PHONY: clean mrproper

clean:
	rm -f *.o *~

mrproper: clean
	rm -f $(EXEC)

